import { ref } from 'vue';

const usePayment = () => {

    const paymentVisible = ref(false);
    const paymentRow = ref({});

    /** 打开 付款 弹窗 */
    const handlOpenPayment = async (row: any) => {
        paymentRow.value = row;
        paymentVisible.value = true;
    };

    /** 关闭 付款 弹窗 */
    const handlOpenPaymentClose = () => {
        paymentVisible.value = false;
    };

    const batchPayment = async () => {
        console.log('批量付款');
        paymentVisible.value = true;
    };

    return {
        paymentVisible,
        paymentRow,
        batchPayment,
        handlOpenPayment,
        handlOpenPaymentClose
    }
};

export default usePayment;
